using System.Collections.Generic;

namespace Mono.Boost.Graph
{


    public struct EdgeInfo
    {
        public EdgeInfo(uint t, uint i)
        {
            id = i;
            v = t;
        }
        public uint id, v;
    }

    public struct EdgeFullInfo
    {
        public EdgeFullInfo(uint f, uint t, uint i)
        {
            id = i;
            from = f;
            to = t;
        }
        public uint id, from, to;
    }

    public interface IGraph
    {
        uint verticesCount { get;}
        uint edgesCount { get;}
        uint highestVertexId { get;}  //often verticesCount-1, but in dynamic graphs (with "holes" in numeration) it can be different
        uint highestEdgeId { get;}
        IEnumerable<EdgeFullInfo> edges { get;}
        IEnumerable<uint> vertices { get;}
        IEnumerable<EdgeInfo> outgoing(uint v);
        IEnumerable<EdgeInfo> incoming(uint v);
        
        uint edge_source(uint id);
        uint edge_destination(uint id);

        StaticPropertyMap<T> createEdgePropertyMap<T>();
        StaticPropertyMap<T> createVertexPropertyMap<T>();
    }

    public interface IDynamicGraph : IGraph
    {
        uint add_vertex();
        uint add_edge(uint u, uint v);
        void delete_vertex(uint i);
        void delete_edge(uint i);
        uint[] reorganize(); //returns new indexes of vertices, maybe change to some PropetyMapper
    }

}
